import server from './server'
export const register = (data) => {  //注册
    return server.post('/register', data)
}


export const captcha = (data) => { //图片验证码
    return server.get('/captcha', {
        params: data
    })
}


export const sendEmail = (data) => { //发送邮箱
    return server.post('/send_email', data)
}

export const sendSms = (data) => { //发送短信
    return server.post('/send_sms', data)
}


export const login = (data) => { //登录
    return server.post('/login', data)
}


export const forgetPassword = (data) => { //忘记密码
    return server.post('/user/reset_login_pwd', data)
}


export const logout = (data) => { //退出登录
    return server.post('/user/logout', data)
}


export const loginHistory = (data) => { //登录日志
    return server.get('/user/loginHistory', {
        params: data
    })
}


export const details = (data) => { //用户个人信息
    return server.get('/user/info', {
        params: data
    })
}

export const updateAvatar = (data) => { //用户修改头像
    return server.post('/user/updateAvatar', data)
}


export const userBankEdit = (data) => { //添加、编辑银行卡
    return server.post('/user/userBankEdit', data)
}


export const assetInfo = (data) => { //资产信息
    return server.get('/account/index', {
        params: data
    })
}


export const areaCodes = (data) => { //地区信息
    return server.get('/country/codes', {
        params: data
    })
}
export const direct_send_sms = (data) => { //发送短信（不需要图片验证码）
    return server.post('/direct_send_sms', data)
}